/**
 * 
 */
package com.shark.app.persistent.repository.impl;

import java.util.List;

import javax.persistence.EntityManager;

import org.shark.jdbcTemplateTool.utils.sql.SqlFileUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;

import com.shark.app.persistent.entity.TWmFinanceSysMenuEntity;
import com.shark.app.persistent.repository.MenuDaoExtends;

/**
 * @author lenovo
 * @description
 * @date 2016年8月17日
 */
public class TMenuRepositoryImpl implements MenuDaoExtends {

	@Autowired
	private EntityManager em;
	
	@Override
	public List<TWmFinanceSysMenuEntity> getAll(@Param("id") int id) {
		String key = "com.shark.app.persistent.repository.MenuDaoExtends.getAll";
		String sql = SqlFileUtil.newInstance.getSql(key);
		return em.createNativeQuery(sql, TWmFinanceSysMenuEntity.class).setParameter("id", id).getResultList();
	}

}
